/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86187
 * Date: 2022-04-15
 * Time: 21:53
 */

//Scanner scan = new Scanner(System.in);

//输出1~100之间的素数
import java.util.Scanner;

public class PrRandNum {

    public static void main(String[] args) {

        int i = 0;
        int j = 0;
        for (j = 2; j <= 100; j++) {

            for (i = 2; i <= (int)Math.sqrt(j); i++) {
                if (j % i == 0 ) {
                    //System.out.println(j+"不是素数！");
                    break;
                }
            }
            if(i > (int)Math.sqrt(j) ) {
                System.out.print(j+" ");
            }
        }
    }
}
